import { COUNTER_INCR, COUNTER_DECR } from "../action/counterAction";

export function counterReducer(state = 10, action) {
    switch (action.type) {
        case COUNTER_INCR:
            return state + 1;
        case COUNTER_DECR:
            return state - 1;
        default:
            return state
    }
}